<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>java script</title>
</head>
<!--改變 HTML 内容-->
<body>
<p id="demo">此HTML的內容元素，透過按按鈕被改變。</p>
<script>
    function MyFunction()
    {
        x = document.getElementById("demo");
        x.innerHTML = "Hello JavaScript";
    }
</script>
<button type="button" onclick="MyFunction()">按鈕</button>
</body>
</html>
